const express = require('express')
const router = express.Router()
const { uploadFile, deleteFile } = require('../controllers/uploadController')
const { asyncHandler } = require('../middleware/error')

// 文件上传
router.post('/file', asyncHandler(uploadFile))

// 删除文件
router.delete('/file/:type', asyncHandler(deleteFile))

module.exports = router 